package com.twu.biblioteca;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.util.ArrayList;

public class BibliotecaApp {

    public static void main(String[] args) throws IOException {
        PrintStream stream = System.out;
        BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
        UserIn userIn = new UserIn(stream, bufferedReader);
        Out out = new Out(stream);

        ArrayList<String> menuOptions = new ArrayList<String>();
        menuOptions.add("Display Library");
        menuOptions.add("Checkout Book");

        Menu menu = new Menu(out, userIn, menuOptions);



        ArrayList<Book> libraryBooks = new ArrayList<Book>();
        libraryBooks.add(new Book("Head First Java"));
        libraryBooks.add(new Book("Refactoring"));
        libraryBooks.add(new Book("TDD By Example"));


        Catalog catalog= new Catalog(libraryBooks, out, userIn);

        LibrarySystem librarySystem = new LibrarySystem(out, menu, catalog);

        librarySystem.go();

    }



}
